package unmsm.eapisw.taller.srh_persistencia.modelo;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="SRH_IMAGEN")
public class HabitacionIMG {
	private int id;
	private byte[] hab_img;
	private TipoHabitacion tipo_hab;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="IN_IDIMAGEN" )
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="LB_IMAGEN")
	public byte[] getHab_img() {
		return hab_img;
	}
	public void setHab_img(byte[] hab_img) {
		this.hab_img = hab_img;
	}
	
	//@ManyToOne(cascade = CascadeType.ALL)
	@ManyToOne
	@JoinColumn(name = "IN_IDTIPOHABITACION")
	public TipoHabitacion getTipo_hab() {
		return tipo_hab;
	}
	public void setTipo_hab(TipoHabitacion tipo_hab) {
		this.tipo_hab = tipo_hab;
	}
	
	
}
